package com.aizuda.boot.modules.business.permission.domain.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @Author sangyirong
 * @ClassName OwnPermissionVO
 * @Version 1.0
 * @Date 2025/7/15 15:52
 */
@Data
public class OwnPermissionVO {

    @Schema(description = "操作权限")
    private List<ControlPermissionVo> controlPermission;

    @Schema(description = "数据权限")
    private List<DataPermissionVo> dataPermission;

    @Data
    @Schema(description = "操作权限")
    public static class ControlPermissionVo {

        @Schema(description = "权限名称")
        private String name;

        @Schema(description = "权限编码")
        private String permissionCode;

        @Schema(description = "权限范围")
        private String scope;

        @Schema(description = "权限类型")
        private List<Permission> permission;
    }

    @Data
    @Schema(description = "数据权限")
    public static class DataPermissionVo {

        @Schema(description = "权限名称")
        private String name;

        @Schema(description = "权限编码")
        private String code;

        @Schema(description = "权限范围")
        private String scope;

        @Schema(description = "权限描述")
        private String description;
    }

    @Data
    @Schema(description = "权限")
    public static class Permission {

        @Schema(description = "权限名称")
        private String name;

        @Schema(description = "权限编码")
        private String code;

    }
}
